package com.uzai.console.enums;

/**
 * 支付宝账单状态
 * @Auther: liuqi
 * @Date: 2021/8/19 11:22
 * @Description:
 */
public enum OrderPullTbRefundTypeEnum {

    REFUND_CREATE(1,"维权创建"),
    ORDER_SETTING(2,"订单结算"),
    REFUND_FINISH(3,"维权完成"),
    ORDER_CREATE(4,"订单创建"),
    ORDER_MODIFY(5,"订单更新"),
    ;

    private Integer type;
    private String desc;

    OrderPullTbRefundTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static OrderPullTbRefundTypeEnum getByType(Integer type) {
        if (type == null) {
            return null;
        }
        for (OrderPullTbRefundTypeEnum orderPullTbRefundTypeEnum: OrderPullTbRefundTypeEnum.values()) {
            if (orderPullTbRefundTypeEnum.getType().intValue() == type.intValue()) {
                return orderPullTbRefundTypeEnum;
            }
        }
        return null;
    }
}
